#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
int main(){
    printf("group id: %d\n", getpgrp());
    setpgid(0, 0);
    printf("group id: %d\n", getpgrp());
    printf("ret: %d\n", setpgid(0, 999));

    printf("create session, sid=gid: %d\n", setsid());
    printf("%s\n", strerror(errno));
    int sid = getsid(0);
    printf("session id: %d\n", sid);
}